package bma.common.langutil.ai.common;

import bma.common.langutil.ai.callback.AICallback;

/**
 * 
 * @author guanzhong
 * @since 1.0 (imported from BMA.ESP Project)
 *
 * @param <RESP_TYPE>
 */
public abstract class AIResponseHandler<RESP_TYPE> implements
		AICallback<RESP_TYPE> {

	@Override
	public void onFailure(Throwable t) {
		handleResponse(null, t);
	}

	@Override
	public void onSuccess(RESP_TYPE result) {
		handleResponse(result, null);
	};

	public abstract void handleResponse(RESP_TYPE result, Throwable t);
}
